const path = require("path");
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const appConfig = require("../app.config.js");

module.exports = merge(common, {
  mode: "development",
  devtool: "inline-source-map",
  /* 不需要devServer，用express启动服务 */
  entry: {
    index: path.resolve(__dirname, "../src/index.ts"),
  },
  output: {
    path: path.resolve(
      __dirname,
      `../cache/${appConfig.ISV}/${appConfig.MODULE_ID}/${appConfig.APP_NAME}`
    ),
  },
});
